<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('投诉建议列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>创建者：</label>
                                <input type="text" name="createBy"/>
                            </li>
                            <li>
                                <label>创建时间：</label>
                                <input type="text" class="time-input" placeholder="请选择创建时间" name="createDate"/>
                            </li>
                            <li>
                                <label>更新者：</label>
                                <input type="text" name="updateBy"/>
                            </li>
                            <li>
                                <label>更新时间：</label>
                                <input type="text" class="time-input" placeholder="请选择更新时间" name="updateDate"/>
                            </li>
                            <li>
                                <label>备注信息：</label>
                                <input type="text" name="REMARKS"/>
                            </li>
                            <li>
                                <label>逻辑删除标记：</label>
                                <input type="text" name="delFlag"/>
                            </li>
                            <li>
                                <label>单位ID：</label>
                                <input type="text" name="UNITID"/>
                            </li>
                            <li>
                                <label>所属机构id：</label>
                                <input type="text" name="ORGANIZEID"/>
                            </li>
                            <li>
                                <label>反馈类型：</label>
                                <input type="text" name="TYPES"/>
                            </li>
                            <li>
                                <label>联系人：</label>
                                <input type="text" name="CONTACT"/>
                            </li>
                            <li>
                                <label>邮箱：</label>
                                <input type="text" name="EMAIL"/>
                            </li>
                            <li>
                                <label>手机：</label>
                                <input type="text" name="MOBILE"/>
                            </li>
                            <li>
                                <label>地址：</label>
                                <input type="text" name="ADDDATE"/>
                            </li>
                            <li>
                                <label>状态：</label>
                                <select name="STATUS">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>处理人：</label>
                                <input type="text" name="HANDLE"/>
                            </li>
                            <li>
                                <label>处理时间：</label>
                                <input type="text" class="time-input" placeholder="请选择处理时间" name="HANDLEDATE"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:advice:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:advice:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:advice:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:advice:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:advice:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:advice:remove')}]];
        var prefix = ctx + "system/advice";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "投诉建议",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'ID',
                    title: '主键',
                    visible: false
                },
                {
                    field: 'createBy',
                    title: '创建者'
                },
                {
                    field: 'createDate',
                    title: '创建时间'
                },
                {
                    field: 'updateBy',
                    title: '更新者'
                },
                {
                    field: 'updateDate',
                    title: '更新时间'
                },
                {
                    field: 'REMARKS',
                    title: '备注信息'
                },
                {
                    field: 'delFlag',
                    title: '逻辑删除标记'
                },
                {
                    field: 'UNITID',
                    title: '单位ID'
                },
                {
                    field: 'ORGANIZEID',
                    title: '所属机构id'
                },
                {
                    field: 'TYPES',
                    title: '反馈类型'
                },
                {
                    field: 'CONTENT',
                    title: '反馈内容'
                },
                {
                    field: 'CONTACT',
                    title: '联系人'
                },
                {
                    field: 'EMAIL',
                    title: '邮箱'
                },
                {
                    field: 'MOBILE',
                    title: '手机'
                },
                {
                    field: 'ADDDATE',
                    title: '地址'
                },
                {
                    field: 'STATUS',
                    title: '状态'
                },
                {
                    field: 'HANDLE',
                    title: '处理人'
                },
                {
                    field: 'HANDLECONTENT',
                    title: '处理结果'
                },
                {
                    field: 'HANDLEDATE',
                    title: '处理时间'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.ID + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.ID + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>